This invention relates to scaling images for display.
Video and graphics images (source images) are often scaled down from their original resolution to fit onto display devices such as computer monitors or scaled up from their original resolution to provide an image of higher resolution and clarity. In these scaling processes, an averaging process combines (averages) two or more pixels that are spatially and/or temporally contiguous in the source image to form one destination pixel of the displayed image. The averaging process can use a nearest neighbor algorithm or a linear interpolation algorithm to effect the scaling.
Referring to FIGS. 1 and 2, the nearest neighbor algorithm computes a destination pixel (y) 10 from two pixels 12a-b (x0, x1) in a source image as:   y  =      {                            x0                                                    if              ⁢                              xe2x80x83                            ⁢              0                         less than =            p0             less than             0.5                                                x1                                                    if              ⁢                              xe2x80x83                            ⁢              0.5                         less than =            p0             less than             1                              
For four source pixels 14a-d (x2-x5), y 16 is:   y1  =      {                                                      x2                                                                        if                  ⁢                                      xe2x80x83                                    ⁢                  0                                 less than =                p1                 less than                 0.5                                                                        x3                                                                        if                  ⁢                                      xe2x80x83                                    ⁢                  0.5                                 less than =                p1                 less than                 1                                                    ⁢                  
                ⁢        y2            =              {                                                                              x4                                                                                            if                      ⁢                                              xe2x80x83                                            ⁢                      0                                         less than =                    p1                     less than                     0.5                                                                                                x5                                                                                            if                      ⁢                                              xe2x80x83                                            ⁢                      0.5                                         less than =                    p1                     less than                     1                                                                        ⁢                          
                        ⁢            y                    =                      {                                                            y1                                                                                            if                      ⁢                                              xe2x80x83                                            ⁢                      0                                         less than =                    p2                     less than                     0.5                                                                                                y2                                                                                            if                      ⁢                                              xe2x80x83                                            ⁢                      0.5                                         less than =                    p2                     less than                     1                                                                                          
Thus, the nearest neighbor algorithm chooses the destination pixel y as the source pixel xi nearest to it.
The linear interpolation algorithm, on the other hand, computes the destination pixel 10 from two pixels 12a-b in a source image as:
y=[x0*(1xe2x88x92p0)]+(x1*p0)
For four source pixels 14a-d, y 16 is:
y1=[x2*(1xe2x88x92p1)]+(x3*p1)
y2=[x4*(1xe2x88x92p1)]+(x5*p1)
y=[y1*(1xe2x88x92p2)]+(y2*p2)
Thus, the linear interpolation algorithm chooses the destination pixel y as a weighted average of the source pixels xj-xk. The destination pixel need not be one of the source pixels as it is for the nearest neighbor algorithm.